<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core">
	<h:body>
		<ui:composition>
			<script type="text/javascript">
				var fieldInformation = {
					username: {placeholder: "#{i18n['entry.usernamePlaceholder']}", optional: true},
					url: {placeholder: "#{i18n['entry.urlPlaceholder']}", optional: true},
					notes: {placeholder: "#{i18n['entry.notesPlaceholder']}", optional: true}
				};
			</script>
			<div>
				<h:outputLabel for="title" value="#{i18n['generic.title']}" />
				<h:inputText id="title" value="#{addEntryBean.title}" autocomplete="off" />
				<span class="error"><h:message for="title" /></span>
			</div>
			<div>
				<h:outputLabel for="password" value="#{i18n['generic.password']}" />
				<h:inputSecret id="password" value="#{addEntryBean.password}" autocomplete="off" redisplay="true" styleClass="switchVisibility generatable" />
				<span class="error"><h:message for="password" /></span>
			</div>
			<div>
				<h:outputLabel value="Strength" />
				<h:outputText id="passwordStrength" value="Unknown" styleClass="outputText" />
			</div>
			<div>
				<h:outputLabel for="username" value="#{i18n['generic.username']}" />
				<h:inputText id="username" value="#{addEntryBean.username}" autocomplete="off" />
				<span class="error"><h:message for="username" /></span>
			</div>
			<div>
				<h:outputLabel for="group" value="#{i18n['generic.group']}" />
				<h:selectOneMenu id="group" value="#{addEntryBean.group}">
					<f:selectItem itemLabel="(none)" itemValue="" />
					<f:selectItems value="#{addEntryBean.groups}" var="group" itemLabel="#{group.title}" itemValue="#{group.exposableId}" />
					<f:selectItem itemLabel="#{i18n['entry.createGroup']}" itemValue="c" />
				</h:selectOneMenu>
				<h:inputText id="groupName" value="#{addEntryBean.groupName}" autocomplete="off" validator="#{addEntryBean.validateGroupName}" />
				<span class="error"><h:message for="group" /></span>
			</div>
			<div>
				<h:outputLabel for="url" value="#{i18n['generic.url']}" />
				<h:inputText id="url" value="#{addEntryBean.url}" autocomplete="off" />
				<span class="error"><h:message for="url" /></span>
			</div>
			<div>
				<h:outputLabel for="notes" value="#{i18n['entry.notes']}" />
				<h:inputTextarea id="notes" value="#{addEntryBean.notes}" autocomplete="off" />
				<span class="error"><h:message for="notes" /></span>
			</div>
		</ui:composition>
	</h:body>
</html>